/*
 * @Description: 
 * @Author: fhw
 * @Date: 2022-11-29 11:10:39
 */
import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty, IsNumber } from "class-validator";
import { ResumeIdDto } from "./resume.dto";

export class CreateResumeProjectDto {
    @IsNotEmpty({ message: '标题不能为空' })
    @ApiProperty({
        type: String,
        name: 'title',
        description: '标题',
    })
    public readonly title: string

    @IsNotEmpty({ message: '项目内容描述不能为空' })
    @ApiProperty({
        type: String,
        name: 'describe',
        description: '项目内容描述',
    })
    public readonly describe: string

    @IsNotEmpty({ message: '使用技术不能为空' })
    @ApiProperty({
        type: String,
        name: 'technology',
        description: '使用技术',
    })
    public readonly technology: string
}
class ProjectDto {
    @IsNumber()
    @IsNotEmpty({ message: 'id不能为空' })
    @ApiProperty({
        type: Number,
        name: 'id',
        description: 'id',
    })
    public readonly id: number

    
    @IsNotEmpty({ message: '标题不能为空' })
    @ApiProperty({
        type: String,
        name: 'title',
        description: '标题',
    })
    public readonly title: string

    @IsNotEmpty({ message: '项目内容描述不能为空' })
    @ApiProperty({
        type: String,
        name: 'describe',
        description: '项目内容描述',
    })
    public readonly describe: string

    @IsNotEmpty({ message: '使用技术不能为空' })
    @ApiProperty({
        type: String,
        name: 'technology',
        description: '使用技术',
    })
    public readonly technology: string
}

export class UpdateResumeProjectDto extends ResumeIdDto {
    @ApiProperty({
        example: ProjectDto,
        type: [ProjectDto],
        description: '技术'
    })
    resumeProject: ProjectDto[]
}
